<%--
  Created by IntelliJ IDEA.
  User: ZOUTONG
  Date: 2021/9/16
  Time: 15:36
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>药品管理</title>

    <!-- jquery -->
    <script type="text/javascript" src="${pageContext.request.contextPath}/static/jquery/jquery-1.12.4.js"></script>

    <!-- 自定义样式 -->
    <link rel="stylesheet" href="${pageContext.request.contextPath}/static/drug/drugzou/css/drug.css">

    <!-- layui -->
    <link rel="stylesheet" href="${pageContext.request.contextPath}/static/layui-v2.6.5/layui/css/layui.css">
    <script type="text/javascript" src="${pageContext.request.contextPath}/static/layui-v2.6.5/layui/layui.js"></script>

    <!-- layer -->
    <link rel="stylesheet" href="${pageContext.request.contextPath}/static/layer/theme/default/layer.css">
    <script type="text/javascript" src="${pageContext.request.contextPath}/static/layer/layer.js"></script>

    <!-- 自定义js -->
    <script type="text/javascript" src="${pageContext.request.contextPath}/static/drug/drugzou/js/drug.js"></script>
    <script type="text/javascript" src="${pageContext.request.contextPath}/static/drug/drugzou/js/medicate.js"></script>

    <!-- 使用layui -->
    <script type="text/javascript"
            src="${pageContext.request.contextPath}/static/drug/drugzou/js/druglayui.js"></script>
    <script type="text/javascript"
            src="${pageContext.request.contextPath}/static/drug/drugzou/js/medicatelayui.js"></script>

</head>
<body>
<!--最外层的div-->
<div>
    <!--选项卡-->
    <div class="layui-tab" lay-filter="synthesis">
        <ul class="layui-tab-title">
            <li class="layui-this">药品管理</li>
            <li lay-id='stork'>添加库存</li>
            <li>新增药品</li>
            <li>申请状态</li>
            <li></li>
        </ul>

        <div class="layui-tab-content">
            <div class="layui-tab-item layui-show">

                <!-- 药品查询-->
                <div>
                    <div class="layui-form">
                        <div class="layui-form-item">
                            <div class="layui-inline">
                                <label class="layui-form-label">药品名称</label>
                                <div class="layui-input-inline" style="width: 160px;">
                                    <input type="text" id="drugname" autocomplete="off" class="layui-input">
                                </div>
                            </div>
                            <div class="layui-inline">
                                <label class="layui-form-label">药品类型</label>
                                <div class="layui-input-inline" style="width: 160px;">
                                    <select id="drugtype">
                                        <option value="0">查询全部</option>
                                        <option value="1">中药</option>
                                        <option value="2">西药</option>
                                    </select>
                                </div>
                            </div>
                        </div>
                    </div>

                    <table id="drug" lay-filter="drugs">

                    </table>

                </div>

            </div>

            <div class="layui-tab-item">

                <!--添加库存-->
                <div style="margin:0 auto;width:560px;">
                    <!--                    添加库存-->
                    <form action="javascript:void(0)" class="layui-form layui-form-pane store" lay-filter="test1">
                        <!--                        申请人-->
                        <div class="layui-form-item">
                            <label class="layui-form-label">申请人</label>
                            <div class="layui-input-block">
                                <input type="text" name="name" required lay-verify="required" placeholder="请输入姓名"
                                       autocomplete="off" class="layui-input">
                            </div>
                        </div>
                        <!--                        申请时间-->
                        <div class="layui-form-item">
                            <label class="layui-form-label">申请时间</label>
                            <div class="layui-input-block">
                                <input type="text" name="date" required lay-verify="required" placeholder="请选择时间"
                                       class="layui-input" id="date"
                                       autocomplete="off">
                            </div>
                        </div>

                        <!--                        选择药品-->
                        <div class="layui-form-item">
                            <label class="layui-form-label layui-form" lay-filter="drug">选择药品</label>
                            <div class="layui-input-inline" style="width: 360px">
                                <select name="choose" lay-search required lay-verift="required">

                                </select>
                            </div>
                            <div class="layui-form-mid layui-word-aux">
                                <span id="sure">&nbsp;确&nbsp;定&nbsp;</span>
                            </div>
                        </div>
                        <div class="divui">
                            <ul>
                                <li class="liui">
                                    <div class="div">
                                        <span class="span">药品编号</span>
                                        <span class="span">药品名称</span>
                                        <span class="span">药品数量</span>
                                        <span class="span">操作</span>
                                    </div>
                                </li>
                            </ul>
                        </div>

                        <div class="layui-form-item">
                            <label class="layui-form-label">备注</label>
                            <div class="layui-input-block">
                                <textarea name="remark" placeholder="备注" class="layui-textarea"
                                          style="height: 140px"></textarea>
                            </div>
                        </div>

                        <!--  提交-->
                        <div class="layui-form-item">
                            <div class="layui-input-block">
                                <button class="layui-btn" lay-submit lay-filter="formDemo">立即提交</button>
                                <button type="reset" class="layui-btn layui-btn-primary">重置</button>
                            </div>
                        </div>
                    </form>
                </div>


            </div>
            <div class="layui-tab-item">

                <!--                添加新药-->
                <div style="margin:0 auto;width:450px;">
                    <!--                    添加新药-->
                    <form action="javascript:void(0)" class="layui-form layui-form-pane add">

                        <!--                        申请人-->
                        <div class="layui-form-item">
                            <label class="layui-form-label">申请人</label>
                            <div class="layui-input-block">
                                <input type="text" name="name" required lay-verify="required" placeholder="请输入姓名"
                                       autocomplete="off" class="layui-input">
                            </div>
                        </div>

                        <!--                        申请时间-->
                        <div class="layui-form-item">
                            <label class="layui-form-label">申请时间</label>
                            <div class="layui-input-block">
                                <input type="text" name="date" required lay-verify="required" placeholder="请选择时间"
                                       class="layui-input" id="date1"
                                       autocomplete="off">
                            </div>
                        </div>

                        <!--                        药品名称-->
                        <div class="layui-form-item">
                            <label class="layui-form-label">药品名称</label>
                            <div class="layui-input-block">
                                <input type="text" name="drug" required lay-verify="required" placeholder="请输入药品名称"
                                       autocomplete="off" class="layui-input">
                            </div>
                        </div>

                        <!--                        药品类型 -->
                        <div class="layui-form-item">
                            <label class="layui-form-label">药品类型</label>
                            <div class="layui-input-block" lay-filter="drug">
                                <select name="type" lay-search>
                                    <option value="1">中药</option>
                                    <option value="2">西药</option>
                                </select>
                            </div>
                        </div>

                        <!--                        药品单位 例:[瓶、盒] -->
                        <div class="layui-form-item">
                            <label class="layui-form-label">药品单位</label>
                            <div class="layui-input-block">
                                <input type="text" name="unit" required lay-verify="required" placeholder="请输入药品单位"
                                       autocomplete="off" class="layui-input">
                            </div>
                        </div>

                        <!--                        单价 -->
                        <div class="layui-form-item">
                            <label class="layui-form-label">药品价格</label>
                            <div class="layui-input-block">
                                <input type="text" name="price" required lay-verify="required|number"
                                       autocomplete="off" class="layui-input">
                            </div>
                        </div>

                        <!--                        数量 -->
                        <div class="layui-form-item">
                            <label class="layui-form-label">药品数量</label>
                            <div class="layui-input-block">
                                <input type="text" name="count" required lay-verify="required|number"
                                       autocomplete="off" class="layui-input">
                            </div>
                        </div>

                        <!--                        备注-->
                        <div class="layui-form-item">
                            <label class="layui-form-label">药品备注</label>
                            <div class="layui-input-block">
                                <textarea name="remark" placeholder="备注" class="layui-textarea"></textarea>
                            </div>
                        </div>
                        <!--                        提交-->
                        <div class="layui-form-item">
                            <div class="layui-input-block">
                                <button class="layui-btn" lay-submit lay-filter="formDemo">立即提交</button>
                                <button type="reset" class="layui-btn layui-btn-primary">重置</button>
                            </div>
                        </div>
                    </form>
                </div>

            </div>
            <div class="layui-tab-item">
                <!--                查看申请状态-->
                <div>
                    <!--                    条件查询-->
                    <div class="layui-form">
                        <div class="layui-form-item">
                            <div class="layui-inline">
                                <label class="layui-form-label">查询时间</label>
                                <div class="layui-input-inline" style="width: 160px;">
                                    <select id="time">
                                        <option value="0">查询全部</option>
                                        <option value="1">最近一周</option>
                                        <option value="2">最近一月</option>
                                        <option value="3">最近一年</option>
                                    </select>
                                </div>
                            </div>
                            <div class="layui-inline">
                                <label class="layui-form-label">申请类型</label>
                                <div class="layui-input-inline" style="width: 160px;">
                                    <select id="type">
                                        <option value="0">查询全部</option>
                                        <option value="1">补充库存</option>
                                        <option value="2">增加新药</option>
                                    </select>
                                </div>
                            </div>
                        </div>
                    </div>

                    <table id="demo" lay-filter="show">

                    </table>

                </div>

            </div>
            <div class="layui-tab-item"></div>
        </div>
    </div>
</div>

</body>

<!--药品管理头工具栏事件-->
<script type="text/html" id="toolbarDemo2">
    <div class="layui-btn-container">
        <button class="layui-btn layui-btn-sm" lay-event="sel">查询</button>
        <button class="layui-btn layui-btn-sm" lay-event="upd">刷新</button>
        <button class="layui-btn layui-btn-sm" lay-event="check">检查库存</button>
    </div>
</script>

<!--申请状态头工具栏事件-->
<script type="text/html" id="toolbarDemo">
    <div class="layui-btn-container">
        <button class="layui-btn layui-btn-sm" lay-event="sel">查询</button>
        <button class="layui-btn layui-btn-sm" lay-event="upd">刷新</button>
    </div>
</script>

<!--申请状态行工具栏-->
<script type="text/html" id="barDemo2">
    <a class="layui-btn layui-btn-xs" lay-event="add">入库</a>
    <a class="layui-btn layui-btn-xs" lay-event="edit">详情</a>
    <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del">删除</a>
</script>

<!--药品管理行工具栏-->
<script type="text/html" id="barDemo">
    <a class="layui-btn layui-btn-xs" lay-event="decl">编辑</a>
    <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del">删除</a>
</script>

</html>
